package com.opensource.component.query.matedata;

import com.opensource.component.query.script.AggregationFunction;
import lombok.AllArgsConstructor;
import lombok.Setter;

/**
 * @author ZonLen since on 2022/1/6 下午2:26
 */

@AllArgsConstructor
public class AggregationColumn {

  @Setter
  private String column;

  private final AggregationFunction aggregationFunction;

  private final String alias;

  public String selectAggregationColumn() {
    return aggregationFunction.format(column, alias);
  }
}
